package com.example.smartmall.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    private boolean success;
    private String errMsg;
    private Object data;

    public static Result ok(){
        return new Result(true,null,null);
    }

    public static Result ok(Object data){
        return new Result(true,null,data);
    }

    public static Result fail(String errMsg){
        return new Result(false,errMsg,null);
    }

}
